﻿@model NetSurveillance.WebApp.Models.CaseModel

@{
    ViewBag.Title = Model != null && Model.Id.HasValue? "Alter Case" : "Create Case";
    Layout = "~/Views/Shared/_SystemConfigLayout.cshtml";
    ViewBag.CurrentMiddleMenu = 8;
    ViewBag.CurrentMainMenu = 5;
}
@section css{
    <style type="text/css">
        .inline-form {
            width: 75%;
            margin: 10px auto;
        }
    </style>
}

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true, Resources.MessageResource.CaseCreateUnSucc)
    <div>
        <fieldset class="inline-form">
            <legend>@Resources.ViewResource.SaveCase_CaseInfo</legend>

            <div class="editor-entry">
                <div class="editor-label">
                    @Html.LabelFor(m => m.Name)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m=>m.Name)
                    @Html.ValidationMessageFor(m => m.Name)
                </div>
            </div>
            <div class="editor-entry">
                <div class="editor-label">
                    @Html.LabelFor(m => m.Desc)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(m=>m.Desc)
                    @Html.ValidationMessageFor(m => m.Desc)
                </div>
            </div>
            @Html.HiddenFor(m => m.Id)
        </fieldset>
        <div class="buttonsContain controlBottom">
            <div class="rightContain">
                <input type="submit" value="@Resources.Resource.Button_Save" />
                <input id="btnBack" type="button" value="@Resources.Resource.Button_Back"/>
            </div>
        </div>
    </div>
}
@section javascript
{
    <script type="text/javascript">
        $(function() {
            $('#btnBack').click(function() {
                window.location.href = '@Url.Action("CaseManage")';
                return false;
            });
        });
    </script>
}
